package com.mthebron.mthapp;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;



import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class HTMLProcess {
	
	private String string ;
	public String getHTML() {
		return string;
	}
	public HTMLProcess(URL urlOrNULLForDefault, String ClassToFindOrNullForDefault) throws IOException {
		// TODO Auto-generated constructor stub
	
		String URL = "http://www.mthebron.com";
		final URL url = urlOrNULLForDefault==null? new URL(URL) : urlOrNULLForDefault;
		Document document = Jsoup.parse(url, 100000000);
		//System.out.print(document.html());
		String limitByClass =(ClassToFindOrNullForDefault==null ? "panel-col-top": ClassToFindOrNullForDefault);
		Elements elements = document.getElementsByClass(limitByClass);
		//System.err.print(elements.size());
		Element element = elements.first();

		string =element.html();
		
	}
	
}
